<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/res/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${site}新闻列表页</title>
<%@ include file="/res/common/meta.jsp" %>
<!-- link href="${ctx}/res/css/" type="text/css" rel="stylesheet"  -->
<script src="${ctx}/res/js/jquery-1.2.6.js" type="text/javascript"></script>
<script src="${ctx}/res/js/main-frame-style.js" type="text/javascript"></script>
<%@ include file="/res/common/js-css.jsp" %>
<script type="text/javascript">
	function gotoWhere(){
		$("#totalPageForm").submit();
	}
</script>
<style type="text/css">
<!--


-->
</style>
<link href="${ctx}/res/css/main.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {border-top-width: 0px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; font-weight: bold; }
-->
</style>
</head>

<body>
<div class="content">
  <div class="title"><table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="63%"><strong>新闻列表</strong></td>
    <td width="30%" align="right"><a href="article!input">添加新闻</a></td>
    <td width="2%"></td><td width="5%"><img src="${ctx}/res/images/up1.gif" border="0" class="close" /></td>
  </tr></table></div>
  <span class="list">

<table border="0" cellpadding="0" cellspacing="0" class="contable">
  <tr>
    <td height="26" align="center" class="STYLE1">新闻标题</td>
	<td align="center" class="mytd"><strong>所属栏目</strong></td>
    <td align="center" class="mytd"><strong>作者</strong></td>
    <td align="center" class="mytd"><strong>提交者</strong></td>
	<td align="center" class="mytd"><strong>点击量</strong></td>
    <td align="center" class="mytd"><strong>发表时间</strong></td>
    <td align="center" class="mytd"><strong>修改时间</strong></td>
	<td align="center" class="mytd"><strong>新闻管理</strong></td>
  </tr>
  <s:iterator value="model.entityList">
  <tr>
    <td height="26" align="center" class="mytd">${title}</td>
	<td align="center" class="mytd"><strong>${category.name}</strong></td>
    <td align="center" class="mytd">${author}</td>
    <td align="center" class="mytd">${adder}</td>
	<td align="center" class="mytd">${hit}</td>
    <td align="center" class="mytd"><s:date name="pubtime" format="yyyy/MM/dd"/></td>
	<td align="center" class="mytd"><s:date name="editime" format="yyyy/MM/dd"/></td>
    <td align="center" class="mytd"><a href="article!input?id=${id}">修改</a> | <a href="article!delete?id=${id}">删除</a></td>
  </tr>
  </s:iterator>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="margin-left:20px;margin-bottom:5px">
  <tr>
	<td width="6%">共${model.totalPages}页</td>
    <td width="12%">共${model.totalCounts}条记录</td>
    <td width="7%">
		<s:if test="model.hasPre"><a href="article?offset=${model.firstNo}">第一页</a></s:if>
		<s:else>第一页</s:else>
	</td>
    <td width="7%">
		<s:if test="model.hasPre"><a href="article?offset=${model.preNo}">上一页</a></s:if>
		<s:else>上一页</s:else>
	</td>
    <td width="7%">
		<s:if test="model.hasNext"><a href="article?offset=${model.nextNo}">下一页</a></s:if>
		<s:else>下一页</s:else>
	</td>
    <td width="10%">
		<s:if test="model.hasNext"><a href="article?offset=${model.lastNo}">最后一页</a></s:if>
		<s:else>最后一页</s:else></td>
    <td width="13%">
		<form action="article" method="get" id="totalPageForm">
		转第
		<select name="pageNo" onchange="gotoWhere()">
			<c:forEach begin="1" end="${model.totalPages}" varStatus="stat">
				<option value="${stat.index}"<c:if test="${stat.index == sessionScope.pageNo}"> selected="selected"</c:if>>${stat.index}</option>
			</c:forEach>
		</select> 页
		</form>
	</td>
    <td></td>
  </tr>
</table>


	
  <sec:authorize ifAnyGranted="A_MODIFY_Article">
	
	</sec:authorize>

	
	<s:property value="exception.message"/>
	<s:property value="message"/>

  </span>
</div>


</body>

</html>
